<%@ Reference Control="~/Controls/GroupMsgTabs.ascx" %>
<%@ Reference Control="~/Controls/PagingControl.ascx" %>
<%@ Page language="vb" Inherits="_2bMatesSite.my_groups" CodeFile="my_groups.aspx.vb" CodeFileBaseClass="_2bMatesSite.BaseWebPage" %>
<%@ Register tagprefix="Pager" Tagname="DataGridPager" Src="Controls/PagingControl.ascx" %>
<%@ Register tagprefix="GroupMsgTabs" Tagname="GroupMsgTabs" Src="Controls/GroupMsgTabs.ascx" %>
<form id=Form1 method=post runat="server">
<table height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <tr>
		<td class="page_title" colspan="3"><asp:literal id="litTitle" runat="server">My Groups&nbsp;</asp:literal></b><b>( <span class=dynamic_number><asp:literal id=litGroupsCount runat="server"></asp:Literal></SPAN> )</td>
	</tr>
  <tr>
    <td class=main_table_border vAlign=top height="100%">
			<div class="content">
        <table cellSpacing=0 cellPadding=0 width="100%" border=0 class="main_text">
          <GroupMsgTabs:GroupMsgTabs id="ucGroupTabs" runat="server"></GroupMsgTabs:GroupMsgTabs>
					<tr>
						<td vAlign=top><asp:label id=lblNoGroups runat="server" Visible="False">You have not created any groups yet.</asp:Label>
							<asp:table id=tblGroups runat="server" width="100%" cellspacing="0" cellpadding="0" class="main_text">
							<asp:TableRow VerticalAlign="Top">
								<asp:TableCell VerticalAlign="Top">
									<table cellspacing="0" cellpadding="1" width="100%" border="0" class="main_text">
										<tr>
											<td><b><br /><asp:literal id="litText" runat="server">This page shows you the groups you are member of.</asp:literal></b></td>
										</tr>
										<tr>
											<td height="5" class="small">&nbsp;</td>
										</tr>
										<tr>
											<td><b>
												<asp:literal id="litSortBy" runat="server">Sort by:&nbsp;&nbsp;</asp:literal>
												<asp:Label id="lblMostRecent" runat="server" CssClass="main_text_sort">Most Recent</asp:Label>
												<asp:LinkButton id="lbMostRecent" runat="server" CssClass="main_text_sort" onclick="lbMostRecent_Click">Most Recent</asp:LinkButton>&nbsp;|&nbsp;
												<asp:Label id="lblPopularity" runat="server" CssClass="main_text_sort">Popularity</asp:Label>
												<asp:LinkButton id="lbPopularity" runat="server"  CssClass="main_text_sort" onclick="lbPopularity_Click">Popularity</asp:LinkButton>&nbsp;|&nbsp;
												<asp:Label id="lblName" runat="server" CssClass="main_text_sort">Name</asp:Label>
												<asp:LinkButton id="lbName" runat="server"  CssClass="main_text_sort" onclick="lbName_Click">Name</asp:LinkButton></b><br />&nbsp;
											</td>
										</tr>																	
										<tr>
											<td valign="top" align="left" class="small">
												<Pager:DataGridPager runat="server" ID="dgPagerUp"></Pager:DataGridPager>
											</td>
										</tr>
										<tr>
											<td align="left" valign="top">
											<asp:DataList runat="server" Width="100%" ShowFooter="False" BorderWidth="0px" ShowHeader="False" HorizontalAlign="Left" CssClass="data_list" RepeatDirection="Horizontal" ID="dlAllGroups" CellPadding="0" verticalalign="Bottom">
												<itemtemplate>
													<table cellspacing="0" cellpadding="0" border="0">
														<tr>
															<td  align="center" valign="top">
																<asp:LinkButton id=lbName runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' CommandName="MemberRedirect" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "GroupID") %>' cssclass="main_text_bold"></asp:LinkButton><br />
																<asp:imagebutton id=imgPhoto runat="server" CssClass="small_image" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageURL") %>' CommandName="MemberRedirect" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "GroupID") %>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "FullName") %>'></asp:imagebutton>
															</td>
														</tr>
														<tr>
															<td class="main_text_err" valign="middle" align="center" height="20">
															<b><asp:Label id="lblMember" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Moderator") %>'></asp:Label></b></td>
														</tr>
														<tr>
															<td valign="top" align="center"><asp:LinkButton id=lbDeleteGroup runat="server" CssClass="main_text_bold" Visible='<%# DataBinder.Eval(Container.DataItem, "DelGroupVisibility") %>' CausesValidation="False" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "GroupID") %>' CommandName="Delete">Delete</asp:LinkButton><asp:LinkButton id="lbUnsubscribeGroup" runat="server" CssClass="main_text_bold" Visible='<%# DataBinder.Eval(Container.DataItem, "UnsubscribeGroupVisibility") %>' CommandArgument='<%# DataBinder.Eval(Container.DataItem, "GroupID") %>' CommandName="Unsubscribe">Unsubscribe</asp:LinkButton></td>
														</tr>
													</table>
												</ItemTemplate>
												<itemstyle horizontalalign="Left" width="12%" verticalalign="top"></ItemStyle>
											</asp:DataList>
											</td>
										</tr>																		
										<tr>
											<td valign="top" align="left" class="small">
												<Pager:DataGridPager runat="server" ID="dgPager"></Pager:DataGridPager>
											</td>
										</tr>																		
									</table>
								</asp:TableCell>
							</asp:TableRow>
						</asp:Table>
					</TD>
				</TR>
				<tr>
					<td valign=top align=right><br />
						<asp:textbox id=txtStartIndexHidden style="FILTER: alpha(opacity=0);border:0px;" runat="server" width="1px" height="1px">0</asp:TextBox>
						<asp:textbox id=txtGroupsCountHidden style="FILTER: alpha(opacity=0);border:0px;" runat="server" width="1px" height="1px">0</asp:TextBox>
						<asp:image id=imgAddFriends runat="server" imageurl="../images/add_friends.gif" imagealign="AbsMiddle"></asp:Image>
						<asp:linkbutton id=lbJoin runat="server" cssclass="main_text_bold" onclick="lbJoin_Click">Create a Group</asp:LinkButton>&nbsp;&nbsp;&nbsp;
						<asp:image id=imgEditFriends runat="server" imageurl="../images/edit_friends.gif" imagealign="AbsMiddle"></asp:Image>
						<asp:linkbutton id=lbEditGroups runat="server" cssclass="main_text_bold" onclick="lbEditGroups_Click">Edit Groups</asp:LinkButton><br><br>
					</td>
				</tr>
			</table>
      </div> 
    </TD>
		<!-- BEGIN SKYSCRAPER ADVERTISEMENT -->	
		<!--
		<td class="small" width="10">&nbsp;</td>
		<td class="border_adv" vAlign="top" width="203" height="100%">
			<table cellSpacing="1" cellPadding="0" width="100%" border="0">
				<tr>
					<td class="small" width="10">&nbsp;</td>
					<td class="advertisement" width="193"><asp:Literal id="litSkyscraperAdvertisement" runat=server></asp:literal></td>
				</tr>
			</table>
		</td>-->
		<!-- END SKYSCRAPER ADVERTISEMENT -->	
	</TR>
</TABLE>
</FORM>
